import java.io.FileWriter;
import java.io.IOException;

public class FileCharWriter {
    public static void main(String[] args) {
        try {
            FileWriter writer = new FileWriter("char_file.txt");
            writer.write('s');
            writer.write("在什么样的花园里挖呀挖");
            writer.write("\n");
            String string = "种什么样的种子开什么样的花";
            writer.write(string, 0,7);

            char[] arrays = {'开','什','么','样','的','花'};
            writer.write(arrays);
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
